home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Multimedia / SoundApp Fat / SoundApp Fat.rsrc / TEXT_1002_AppleScript.txt < prev    next >
Text File  |  1997-02-26  |  8KB  |  79 lines

  1. AppleScript
  2.  
  3. This section gives an overview of SoundApp‚Äôs support for the AppleEvent Object Model and AppleScript. Not everything is documented here. For more information, see your documentation on AppleScript and the Scripting Dictionary of SoundApp using your favorite script editor.
  4.  
  5. Script Menu
  6. SoundApp supports a script menu which allows scripts to be executed directly from a menu in SoundApp. In order to utilize this feature, create a folder called ‚ÄúScript Menu Items‚Äù in the same directory as the SoundApp application. Then place compiled scripts into the folder and launch SoundApp. A new ‚ÄúScript‚Äù menu will be added to the menu bar, listing the scripts in the folder. Simply select one to run it. Scripts can direct SoundApp or other applications to do just about anything.
  7.  
  8. Application
  9. In addition to the Core Suite of open, run, and quit (print is not supported), SoundApp supports the following verbs:
  10.  
  11. ‚óä convert {alias, alias list, string, string list} [to {alias, alias list, string, string list}] [encoding {PCM, ¬µLaw, IMA}] [channels {default, mono, stereo}] [bits {default, eight, sixteen}] [rate rate] [law {full, reduced, smart}] [with(out) DOSify] [as {System7, suitcase, AIFF, Wave, AU, NeXT, SD, QuickTime}]: Converts the specified file(s) to the destination file(s). If multiple source files are specified and a single destination, the destination is assumed to be a folder. If no to parameter is specified, the default conversion output method is used (as specified in the Convert pane of the Preferences dialog). The encoding, channels and bits parameters allow the encoding, channel and bit resolution setting to be overridden. The rate parameter allows the output sampling rate setting to be changed. If these are omitted, the value specified in the Convert pane of the Preferences dialog will be used. The law parameter controls whether ¬µ-law and a-law files are converted as 16-bit (full), 8-bit (reduced) or 8-bit with smart processing (smart). The DOSify parameter causes new output file names to be created with the archaic MS-DOS 8.3 filename format. This is ignored if a single file is converted and the to parameter is specified. The as parameter allows the output sound format to be specified. Again, if it‚Äôs not specified, the default in the Convert pane of the Preferences dialog will be used instead.
  12.  
  13. ‚óä play {alias, alias list, string, string list} [bits {default, eight, sixteen}] [law {full, reduced, smart}] [buffer size] [MODDriver {trecker, preferTrecker, preferZSS, ZSS}] [MODStereo {mono, stereo, enhanced}] [with(out) MODFilter] [with(out) MODSixteen] [with(out) MODTempMem] [MODVolume volume] [modRate rate] [MIDIDriver {QuickTime, OMS}] [with(out) sendGMReset] [with(out) ignoreSysEx]: Plays the file or files passed as the direct parameter. The bits and law parameters function as above. The buffer parameter specifies the size in kilobytes of the buffer used for double-buffering. A value of zero means don‚Äôt double-buffer; otherwise, the value must be at least 64. The MODDriver, MODtereo, MODixteen, MODilter, MODTempMem, MODRate and modVolume parameters control the ‚ÄúMOD Driver,‚Äù ‚ÄúStereo Mode,‚Äù ‚ÄúReal-Time Filter,‚Äù ‚Äú16-Bit,‚Äù ‚ÄúUse System Memory,‚Äù ‚ÄúPlayback Rate‚Äù and ‚ÄúVolume‚Äù settings in the MOD pane of the Preferences dialog respectively. The MIDIDriver, sendGMReset and ignoreSysEx parameters control the ‚ÄúMIDI Driver,‚Äù ‚ÄúSend General MIDI Reset,‚Äù and ‚ÄúIgnore SysEx Messages‚Äù settings in the MIDI pane of the Preferences dialog respectively. The volume value must be at least zero and no more than 255. The rate value must be at least 8000 and no more than 48000. 
  14.  
  15. ‚óä get information {alias, alias list, string, string list}: Opens an information window for each of the specified files.
  16.  
  17. ‚óä get status: Returns one of {idle, busy, paused} indicating what SoundApp is currently doing.
  18.  
  19. ‚óä set status to {paused, next, previous, stopped}: Changes the current activity status of SoundApp. ‚ÄúPaused‚Äù pauses or resumes playback, ‚Äúnext‚Äù and ‚Äúprevious‚Äù jump to the next or previous file and ‚Äústopped‚Äù stops processing immediately.
  20.  
  21. ‚óä get preferences: Returns a record containing a list of all the global preferences.
  22.  
  23. ‚óä set preferences to {preference: value ‚Ķ}: Changes one or all of the global preferences based on a specified record. Single preferences can be operated on directly if desired, e.g. set autoQuit to true.
  24.  
  25. ‚óä get conversion setting specifier: Retrieves the indexed or named conversion setting. The object conversion settings can be used to retrieve a list of all of them.
  26.  
  27. ‚óä get setting of conversion setting: Retrieves an attribute from the specified conversion setting.
  28.  
  29. ‚óä set setting of conversion setting to specifier: Sets an attribute of the specified conversion setting to the specified value.
  30.  
  31. ‚óä set convert settings save flag to {true, false}: Sets an internal flag which controls whether to save the conversion settings whenever they are changed via an AppleEvent. This can speed processing, but the settings will be lost when SoundApp exits. This flags has no effect when changing the settings via the menus.
  32.  
  33. ‚óä get convert settings save flag: Returns the value of the internal flag which can be set with the above command.
  34.  
  35. ‚óä show {about, help} window: Opens the About window and displays either the About or Help pane, respectively. You can use ‚Äúset/get pane‚Äù to manipulate the current pane in the window.
  36.  
  37. ‚óä yield: Yields time to SoundApp to process files. This can be used in an AppleScript loop which waits for status to go to idle to determine when SoundApp is done.
  38.  
  39. Play Lists
  40. Play lists are references as a document in SoundApp. The following verbs can be used on them:
  41.  
  42. ‚óä insert into document files file at position: Inserts the specified file at the specified position (an integer) in the list.
  43.  
  44. ‚óä play from entries {selected, list of entries}: Plays either the currently selected entries or the list of entries specified.
  45.  
  46. ‚óä convert from entries {selected, list of entries}: Converts either the currently selected entries or the list of entries specified.
  47.  
  48. ‚óä get information from entries {selected, list of entries}: Gets information for either the currently selected entries or the list of entries specified.
  49.  
  50. ‚óä delete entry: Removes the specified entry from the list.
  51.  
  52. ‚óä move entry to location: Moves the specified entry to another location  in the list.
  53.  
  54. ‚óä duplicate entry to location: Creates a copy of the specified entry at another location in the list.
  55.  
  56. ‚óä set {shuffle, repeatProcessing} to {true, false}: Changes the value of the Shuffle and Repeat checkboxes.
  57.  
  58. ‚óä get {shuffle, repeatProcessing}: Retrieves the value of the Shuffle and Repeat checkboxes.
  59.  
  60. ‚óä get sort mode: Retrieves the sorting mode. Valid values are none, by name and by type.
  61.  
  62. ‚óä set sort mode to {none, by name, by type}: Retrieves or changes the sorting mode.
  63.  
  64. ‚óä get selection: Retrieves the current selection.
  65.  
  66. ‚óä set selection to {entry, list of entries}: Changes the selection to the specified entry or entries.
  67.  
  68. Objects
  69. The following objects are supported:
  70.  
  71. ‚óä application: The SoundApp application.
  72.  
  73. ‚óä document: A Play List document. Documents can only be referenced by name.
  74.  
  75. ‚óä entry: An entry in a Play List.
  76.  
  77. ‚óä conversion setting: A list containing all the output setting parameters.
  78.  
  79. ‚óä preferences record: A record consisting of all the SoundApp global preferences. Settings in the Convert menu are not included here.